package org.NooLab.itexx.stuctures;

import java.io.Serializable;
import java.util.ArrayList;

public class UrlDescriptor implements UrlDescriptorIntf, Serializable{

	
	String docUrlStr = "" ;
	String linkUrlStr = "" ;
	
	ArrayList<Integer> positionsInDoc = new ArrayList<Integer>();
	int positionInDoc = 0; 
	
	
	// ========================================================================
	public UrlDescriptor(){
		
	}
	// ========================================================================

	public String getDocUrlStr() {
		return docUrlStr;
	}

	public void setDocUrlStr(String docUrlStr) {
		this.docUrlStr = docUrlStr;
	}

	public String getLinkUrlStr() {
		return linkUrlStr;
	}

	public void setLinkUrlStr(String linkUrlStr) {
		this.linkUrlStr = linkUrlStr;
	}


	public int getPosInDoc() {
		return positionInDoc;
	}


	public void setPosInDoc(int posInDoc) {
		this.positionInDoc = posInDoc;
	}

	public void setPositionsInDoc(int[] positions) {
		
		if ((positions==null) || (positions.length==0)){
			return;
		}
		for (int i=0;i<positions.length;i++){
			if (positions[i]>=0){
				positionsInDoc.add(positions[i]) ; 
			}
		}
	}
	
	
}
